import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};


// 活动

/** 新增活动 */
export const activityListinsertactivity = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/activity/insertactivity"), { data });
};


/** 删除活动 */
export const activityListdelactivity = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/secbackend/activity/delactivity/${userid}`));
};

/** 修改活动 */
export const activityListupdateactivity = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/activity/updateactivity"), { data });
};

/** 分页查询活动 */
export const activityListselactivitybypage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/secbackend/activity/selactivitybypage`), { data });
};





//  赛事

/** 新增赛事 */
export const Competitioninsertevents = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/event/insertevent"), { data });
};


/** 删除资讯 */
export const Competitiondelevent = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/secbackend/event/delevent/${userid}`));
};

/** 修改资讯 */
export const Competitionupdateevent = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/secbackend/event/updateevent"), { data });
};

/** 分页查询资讯 */
export const Competitionseleventbypages = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi(`/secbackend/event/seleventbypage`), { data });
};






